// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_PLAN_APPLICATION_ITEM
// * CreateDate    : 2011-8-11 20:46:48
// * Creater       : CodeSmith
// * LastChangeDate: 2011-8-11 20:46:48
// * LastChanger   : 2011-8-11 20:46:48
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class ProdPlanApplicationItemEntity : EntityBase
    {
        public ProdPlanApplicationItemTable TableSchema
        {
            get
            {
                return ProdPlanApplicationItemTable.Current;
            }
		}
		
		public ProdPlanApplicationItemEntity()
        {

        }
		
		public ProdPlanApplicationItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.ProductType = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE"]));
			this.BlueprintStartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BLUEPRINT_START_DATE"]));
			this.BlueprintEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BLUEPRINT_END_DATE"]));
			this.PackageType = Convert.ToString(CommonFunctions.ToObject(dr["PACKAGE_TYPE"]));
			this.CheckingType = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_TYPE"]));
			this.PrintBrand = Convert.ToInt32(CommonFunctions.ToObject(dr["PRINT_BRAND"]));
			this.IsFinished = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_FINISHED"]));
			this.DeliveryApplication = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_APPLICATION"]));
			this.DeliveryQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_QTY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public ProdPlanApplicationItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.ProductType = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE"]));
			this.BlueprintStartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BLUEPRINT_START_DATE"]));
			this.BlueprintEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BLUEPRINT_END_DATE"]));
			this.PackageType = Convert.ToString(CommonFunctions.ToObject(dr["PACKAGE_TYPE"]));
			this.CheckingType = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_TYPE"]));
			this.PrintBrand = Convert.ToInt32(CommonFunctions.ToObject(dr["PRINT_BRAND"]));
			this.IsFinished = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_FINISHED"]));
			this.DeliveryApplication = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_APPLICATION"]));
			this.DeliveryQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_QTY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdPlanApplicationItemTable.Current;
            }
        }
		
		#region Perporty List
        public string ApplicationItemId
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_APPLICATION_ITEM_ID)); }
            set { SetData(ProdPlanApplicationItemTable.C_APPLICATION_ITEM_ID, value); }
        }
		
        public string ApplicationId
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_APPLICATION_ID)); }
            set { SetData(ProdPlanApplicationItemTable.C_APPLICATION_ID, value); }
        }
		
        public string ProductId
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_PRODUCT_ID)); }
            set { SetData(ProdPlanApplicationItemTable.C_PRODUCT_ID, value); }
        }
		
        public string LocationCode
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_LOCATION_CODE)); }
            set { SetData(ProdPlanApplicationItemTable.C_LOCATION_CODE, value); }
        }
		
        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(ProdPlanApplicationItemTable.C_QTY)); }
            set { SetData(ProdPlanApplicationItemTable.C_QTY, value); }
        }
		
        public decimal Price
        {
            get { return Convert.ToDecimal(GetData(ProdPlanApplicationItemTable.C_PRICE)); }
            set { SetData(ProdPlanApplicationItemTable.C_PRICE, value); }
        }
		
        public string ProductType
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_PRODUCT_TYPE)); }
            set { SetData(ProdPlanApplicationItemTable.C_PRODUCT_TYPE, value); }
        }
		
        public DateTime BlueprintStartDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanApplicationItemTable.C_BLUEPRINT_START_DATE)); }
            set { SetData(ProdPlanApplicationItemTable.C_BLUEPRINT_START_DATE, value); }
        }
		
        public DateTime BlueprintEndDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanApplicationItemTable.C_BLUEPRINT_END_DATE)); }
            set { SetData(ProdPlanApplicationItemTable.C_BLUEPRINT_END_DATE, value); }
        }
		
        public string PackageType
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_PACKAGE_TYPE)); }
            set { SetData(ProdPlanApplicationItemTable.C_PACKAGE_TYPE, value); }
        }
		
        public string CheckingType
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_CHECKING_TYPE)); }
            set { SetData(ProdPlanApplicationItemTable.C_CHECKING_TYPE, value); }
        }
		
        public int PrintBrand
        {
            get { return Convert.ToInt32(GetData(ProdPlanApplicationItemTable.C_PRINT_BRAND)); }
            set { SetData(ProdPlanApplicationItemTable.C_PRINT_BRAND, value); }
        }
		
        public int IsFinished
        {
            get { return Convert.ToInt32(GetData(ProdPlanApplicationItemTable.C_IS_FINISHED)); }
            set { SetData(ProdPlanApplicationItemTable.C_IS_FINISHED, value); }
        }
		
        public string DeliveryApplication
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_DELIVERY_APPLICATION)); }
            set { SetData(ProdPlanApplicationItemTable.C_DELIVERY_APPLICATION, value); }
        }
		
        public decimal DeliveryQty
        {
            get { return Convert.ToDecimal(GetData(ProdPlanApplicationItemTable.C_DELIVERY_QTY)); }
            set { SetData(ProdPlanApplicationItemTable.C_DELIVERY_QTY, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_STATUS)); }
            set { SetData(ProdPlanApplicationItemTable.C_STATUS, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationItemTable.C_REMARK)); }
            set { SetData(ProdPlanApplicationItemTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

